#include <my_header.h>

/* Usage: ./work.c */
int main(int argc, char *argv[]){                                  
    pid_t pid = fork();
    ERROR_CHECK(pid, -1, "fork");

    if(pid == 0)
    {
        execl("./work_ls","./work_ls", (char*) 0);
        exit(EXIT_SUCCESS);
    }else{
        // 等待回收资源
        wait(NULL);
        printf("回收资源\n");

    }
    return 0;
}

#if 0

int main(int argc,char*argv[])
{

   if(fork() == 0){
       execl("./ls", "./ls", (char *)0);
   }else{
       wait(NULL);
   }
   return 0;
}

#endif
